<?php 
header("Content-Type: text/html; charset=utf-8");

	$con = mysql_connect("localhost","root");
	if (!$con) {
		die("连接失败。");
	}
	mysql_select_db("test", $con) or die("切换失败");

	$uid = $_POST["id"];
	$usubject = $_POST["subject"];
	$ucontent = $_POST["content"];

	$sql = "INSERT INTO blog
	(id, subject, content) 
	VALUES 
	('$_POST[id]', '$_POST[subject]', '$_POST[content]')";

	mysql_query($sql, $con) or die("插入失败。");

	mysql_close($con);

	header("location: out.php");

?>